package cn.admin.configcenter.registry.common.constants;

import cn.admin.configcenter.registry.common.util.ConfigWarnings;

public enum WarningCode {

	NO_RESPONSE("NO-RESPONSE"),
	CLIENT_RE_PUBLISH("clientRePublish"),
	PUBLISH_NON_TEXT("publishNonText"),
	CLIENT_INCONSISTENCY("inconsistency"),
	SYNC_FAILED("syncFailed"),
	MAP_MAKER_ERROR("MapMakerError"),
	PERSIST_ERROR("persistDataError"),
	PERSISTENCY_CONFLICT("PERSISTENCY-CONFLICT"),
	NOTIFY_SUBINFO("notify-subinfo"),
	DIAMOND_PUB_FAIL("diamondPubFailed");

	private final String code;

	WarningCode(String _code) {
		this.code = _code;
	}

	public String getCode() {
		return this.code;
	}

	public void warning(String msg) {
		ConfigWarnings.warning(this, msg);
	}

	public String toString() {
		return "Warning code is " + this.code;
	}

}
